#!/usr/bin/python
# -*- coding: utf-8 -*-
# Description: web urls
# Create: Jun 8, 2008
# Author: MK2[fengmk2@gmail.com]

from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic import simple

urlpatterns = patterns('',
    (r'^$', 'net4.web.views.index'),
    (r'^visit/?$', 'net4.web.views.visit'),
    (r'^metaweblog/?$', 'net4.core.xmlrpc.view', {'module': 'net4.web.metaweblog'}),
    
    (r'^api/', include('net4.web.api.urls')),
    (r'^(?P<tiny>[^/]+)/?$', 'net4.web.api.views.redirect'),
#    (r'^getftpip', 'views.get_ftpip'),
#    
#    # posts
#    (r'^post/', include('posts.urls')),
#    (r'^posts/', simple.redirect_to, {'url': '/post/list/'}),
#    (r'^archives?/', simple.redirect_to, {'url': '/post/list/'}),
#    
#    # feeds
#    (r'^(?:feeds?|rss|atom)/$', simple.redirect_to, {'url': '/feed/list/'}),
#    (r'^feed/', include('feeds.urls')),
#    
#    # contact
#    (r'^contact/$', 'contacts.views.contact'),
#    (r'^contact/thanks/$', 'contacts.views.thanks'),
#    #search
#    (r'^search/$', 'books.views.search'),
#    # admin:
#    (r'^admin/', include('django.contrib.admin.urls')),
##    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    #media
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.STATIC_PATH,
         'show_indexes': True}),
)
